The present invention relates generally to systems for computer graphics. More specifically, the present invention includes a method and apparatus for realistically rendering lightpoints included in simulation environments, such as flight simulators.
Lightpoints are small sources of light such as stars, beacons, and runway lights. Depicting lightpoints in a realistic manner is, an important part of making three-dimensional images believable. Realistic depiction of lightpoints is difficult, however, when the intended application is a simulation environment, such as a flight simulator or virtual reality environment. This difficulty is caused by the need to constantly adjust the appearance of lightpoints as they shift in relation to the viewer""s eye.
As an example, consider the case of a. flight simulator depicting a nighttime approach to a runway. Typical runways are surrounded by runway lights. For the flight simulator, each of these runway lights is a lightpoint. These lightpoints must be rendered in a realistic fashion from the point where they first become visible to the point where the runway is beneath the plane. Clearly, this involves a great change in perspective. For the simulation to be believable, the runway lights must have a realistic, appearance over this entire perspective change.
Traditionally, lightpoints have been rendered as collections of raster pixels. The collections of pixels produce a fixed size image that does not change to account for changes in perspective. As a result, lightpoints that appear to be correctly sized when viewed from a distance will appear to shrink (in relation to background images) as they are approached. Rendering light points as collections of raster pixels also tends to produce aliasing within the pixels of the lightpoints. Aliasing results because lightpoints typically have a round or elliptical cross-section. This cross-section must be mapped to square pixels. As a result, edges of the cross-section may fall between adjacent pixels and need to contribute partially to both pixels. The fixed size and aliasing produced by rendered lightpoints as collections of raster pixels compromises the realism of this technique.
An alternative is to render lightpoints as calligraphic images. The calligraphic images are overlaid onto a background image produced using normal raster techniques. Use of calligraphically rendered lightpoints eliminates the aliasing present in lightpoints created using raster techniques. Unfortunately, calligraphic rendering requires specialized hardware. As a result, the use of calligraphic techniques may be impractical for many simulation environments.
Thus, a need exists for a high performance method for rendering lightpoints that avoids or reduces lightpoint shrinking and pixel aliasing. This need is especially important for simulation environments, such as flight simulators and for highly realistic virtual reality systems.
An embodiment of the present invention includes a method and apparatus for rendering radiometrically accurate texture-based lightpoints. For the method of the present invention, programmer creates a series of texture maps for each type of lightpoint. The programmer creates the texture maps for a lightpoint to approximate cross-sections of the lightpoint""s lobe at different distances from the lightpoint. The texture maps for a cross-section preferably include separate components for blue, green and red textures as well as a transparency or xe2x80x98alphaxe2x80x99 texture. The entire series of texture maps for a lightpoint are encoded in a data structure known as a mipmap.
The visual simulation environment in which the lightpoints are displayed uses a billboarding technique to render each lightpoint. The billboarding technique causes the lobe of each lightpoint to be oriented towards the viewer""s eye (the eye point). As the position of the eye point changes, the visual simulation environment adjusts the billboarding technique so that the lobes remain focused towards the viewer.
The visual simulation environment textures each lightpoint so that the lightpoint appears realistic. To texture a lightpoint, the visual simulation environment calculates the distance from the lightpoint to the viewer""s eye and the angle of rotation of t he lightpoint. The visual simulation environment then determines if an appropriate texture map for this distance and angle of rotation is included in the lightpoint""s mipmap. If an appropriate texture map exists, the visual simulation environment selects the texture map for use with the lightpoint. If no appropriate texture map is found, the visual simulation environment generates a texture map. The visual simulation environment generates the texture map by interpolating between the two texture maps within the mipmap that most closely match the distance from the lightpoint to the viewer""s eye and the lightpoint""s angle of rotation. The visual simulation environment then applies the selected or generated texture map to the underlying image of the lightpoint. The texture map gives the lightpoint a realistic appearance, that matches the distance between the lightpoint and the viewer""s eye.
In this way, the present invention provides a high performance method for rendering lightpoints that avoids or reduces lightpoint shrinking and pixel aliasing. The method is especially desirable because it functions in traditional raster environments without the need for specialized display hardware. The method provides high-performance rendering of realistic lightpoints for all hardware platforms that support mipmap based texturing.
Advantages of the invention will be set forth, in part, in the description that follows and, in part, will be understood by those skilled in the art from the description herein. The advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims and equivalents.